<template>
  <div class="PageContent">

  <!--  <el-button type="success" icon="el-icon-plus" @click="FIStartDetectFace_1()">开启人脸检测 </el-button>
    <el-button type="success" icon="el-icon-plus" @click="FIReadCard()">读身份证 </el-button>-->
    <el-button type="success" icon="el-icon-plus" @click="onLoding()">载入 </el-button>
    <el-button type="success" icon="el-icon-plus" @click="camSwitch(1)">打开视频1 </el-button>
    <el-button type="success" icon="el-icon-plus" @click="camSwitch(2)">打开视频2 </el-button>
    <el-button type="success" icon="el-icon-plus" @click="closeVideoHY">关闭视频</el-button>
    <el-button type="success" icon="el-icon-plus" @click="BB">拍照</el-button>
    <el-button type="success" icon="el-icon-plus" @click="BB64">拍照Base64</el-button>
    <P>
    <TABLE id=Table3 border=1 cellSpacing=1 cellPadding=1 width=1024 height=221>
      <TR>
        <TD width=84>打开视频</TD>
        <TD>
          <INPUT id="button1" type=button value=打开视频1 name=button1 onclick="cam_switch(1);" style="Z-INDEX: 0"/>
            <INPUT id="button1" type=button value=打开视频2 name=button1 onclick="cam_switch(2);" style="Z-INDEX: 0"/>
              <INPUT id="button1" type=button value=打开视频3 name=button1 onclick="cam_switch(3);" style="Z-INDEX: 0"/>
                <INPUT id="button1" type=button value=关闭视频 name=button1 onclick="CloseVideo();" style="Z-INDEX: 0"/>
                  <INPUT id="button6" type=button value=初始化结果 name=button7  onclick="GetInitRet();" style="Z-INDEX: 0"/>
        </TD>

        <TD width="300" rowspan="5"><IMG ID="Base64IMG" height="225" width="300" src=""></IMG></TD>
        <TD width="200" rowspan="5">
          <textarea id="Console" style="height:225px;width:221px;resize:none" disabled="disabled"></textarea></TD>
      </TR>

      <TR>
        <TD width=84 height=79>视频操作</TD>
        <TD height=79>
          <INPUT id="Button2" type=button value=取分辨率 name=button16 onclick="GetFbl();" style="Z-INDEX: 0"/>
            <INPUT id="button6" type=button value=取PID name=button15  onclick="GetPid();" style="Z-INDEX: 0"/>
              <INPUT id=button3 type=button value=设置分辨率 name=button3 onclick="SetResolution();" style="Z-INDEX: 0"/>
                <INPUT id=button4 type=button value=设置视频方向 name=button4 onclick="SetOrientation();" style="Z-INDEX: 0"/>
                  <INPUT id=button4 type=button value=左旋 name=button4 onclick="SetLeft();" style="Z-INDEX: 0"/>
                    <INPUT id=button4 type=button value=右旋 name=button4 onclick="SetRight();" style="Z-INDEX: 0"/>
                      <INPUT id="button6" type=button value=设置质量 name=button6  onclick="SetQuality();" style="Z-INDEX: 0"/>
                        <INPUT id="button6" type=button value=自动裁边开 name=button8  onclick="SetAutoCutOn();" style="Z-INDEX: 0"/>
                          <INPUT id="button6" type=button value=自动裁边关 name=button9  onclick="SetAutoCutOff();" style="Z-INDEX: 0"/>
                            <INPUT id="button6" type=button value=预设框选 name=button17  onclick="SetBox();" style="Z-INDEX: 0"/>
                              <INPUT id="button6" type=button value=当前预设 name=button19  onclick="ShowResetInfo();"style="Z-INDEX: 0"/>
                                <INPUT id="button6" type=button value=取消预设 name=button18  onclick="ResetBox();" style="Z-INDEX: 0"/>
                                  <INPUT id="button6" type=button value=视频格式 name=button19  onclick="FormatDlg();"style="Z-INDEX: 0"/>
                                    <INPUT id="button6" type=button value=视频属性 name=button18  onclick="PropertyDlg();" style="Z-INDEX: 0"/>
                                      <INPUT id="button6" type=button value=多图裁剪 name=button19  onclick="MultiDete();"style="Z-INDEX: 0"/>
                                        <INPUT id="button6" type=button value=人脸检测 name=button18  onclick="FaceDete();" style="Z-INDEX: 0"/>
        </TD></TR>

      <TR>
        <TD width=84>截图</TD>
        <TD>
          <INPUT id="button1" type=button value=拍照 name=button1 onclick="bb();" style="Z-INDEX: 0"/>
            <INPUT id="button1" type=button value=内存拍照[Base64] name=button19 onclick="bbase64();" style="Z-INDEX: 0"/>
              <INPUT id="button6" type=button value=Base64测试 name=button7  onclick="TestBase64();" style="Z-INDEX: 0"/>
                <INPUT id="button1" type=button value=开启自动去底色 name=button19 onclick="bbStartClean();" style="Z-INDEX: 0"/>
                  <INPUT id="button6" type=button value=关闭自动去底色 name=button7  onclick="bbCloseClean();" style="Z-INDEX: 0"/>
                    <INPUT id="button6" type=button value=设置DPI name=button7  onclick="setDPI();" style="Z-INDEX: 0"/>
        </TD></TR>
      <TR>
        <TD width=84>PDF 功能</TD>
        <TD>
          <INPUT style="Z-INDEX: 0" id="button13" onclick=SetPDFPath(); value=设置PDF临时目录 type=button name=button1 />
            <INPUT style="Z-INDEX: 0" id=Button9 onclick=BeginPDF(); value=开始制作PDF type=button name=button1 />
              <INPUT style="Z-INDEX: 0" id="button10" onclick=GetPDF(); value=PDF拍照 type=button name=button1 />
                <INPUT style="Z-INDEX: 0" id="button11" onclick=EndPDF(); value=完成制作 type=button name=button1 />
                  <INPUT style="Z-INDEX: 0" id="button11" onclick=PDFtoBASE64(); value=PDF转base64存txt type=button name=button1 />
                    <INPUT style="Z-INDEX: 0" id="button11" onclick=BASE64toPDF(); value=base64转PDF type=button name=button1 />
                      <INPUT style="Z-INDEX: 0" id="button11" onclick=PDFtoBASE64Str(); value=PDF转base64网页获取 type=button name=button1 />
        </TD>
      </TR>
      <TR>
        <TD width=84>其它操作</TD>
        <TD>
          <INPUT id="button6" type=button value=打印 name=button13  onclick="printimage();" style="Z-INDEX: 0"/>
            <INPUT id="button6" type=button value=版本信息 name=button13  onclick="GetlibInfo();" style="Z-INDEX: 0"/>
              <INPUT id="button6" type=button value=启用错误提示 name=button18  onclick="ShowErrorInfo();" style="Z-INDEX: 0"/>
                <INPUT id="button6" type=button value=初始化人脸比对 name=button18  onclick="InitFI();" style="Z-INDEX: 0"/>
                  <INPUT id="button6" type=button value=图图比对 name=button18  onclick="IDCardCompare();" style="Z-INDEX: 0"/>
                    <INPUT id="button6" type=button value=反初始化人脸比对 name=button18  onclick="UnitFI();" style="Z-INDEX: 0"/>
        </TD></TR>
    </TABLE></P>

    <TABLE id=Table1 border=1 cellSpacing=1 cellPadding=1 width=1024>
      <TR>
        <TD width=640>
          <canvas id="cam" width="640" height="640" value="123" style="border:1px solid #000000;">Your browser does not support the canvas element.</canvas>
        </TD>

        <TD>
          <TABLE id=Table2 border=0 cellSpacing=1 cellPadding=1 width=300>
            <TR>
              <TD><IMG id=IMG3 src="" width=300 height=160 /></TD></TR>
            <TR>
              <TD>
                <INPUT  id=Button8 onclick=DelPDF3(); value=删除图片 type=button name=button1 /></TD></TR>
            <TR>
              <TD><IMG  id=IMG2 src="" width=300 height=160  /></TD></TR>
            <TR>
              <TD>
                <INPUT  id=Button7 onclick=DelPDF2(); value=删除图片 type=button name=button1  /></TD></TR>
            <TR>
              <TD>
                <IMG id=IMG1 src="" width=300 height=160 /></TD></TR>
            <TR>
              <TD>
                <INPUT id=Button5 onclick=DelPDF1(); value=删除图片 type=button name=button1 /></TD></TR></TABLE>
        </TD>

      </TR></TABLE>
    <div class="PageItem" >





  </div>
  </div>
</template>

<script>
   import  fs1000a3td   from '@/api/FS1000A3TD'//多浏览器引入脚本
    export default {
        name: "PersionCard",
      data() {return {
        bFIInit:false,
        fThreshold:0.7,//验证门限
        strTipsType:"StartReadCard",
        timerFlag1:false,//提示牌定时器标志
        timerFlag2:false,//身份证阅读定时器标志
        bFIInit:false,//人脸模块初始化标志
        bRCInit:false,//身份证模块初始化标志
        bIsGrayVideoInit:false,//控制活体检测模式
        bTipFlash:true//控制提示是否闪烁
       }
      },
      methods: {
        // 单元格的 style 的回调方法
        FIStartDetectFace_1(v) {
          /*if(!this.bFIInit)
          {
            return;
          }*/
         /* var nRet = FLFICtrl.FLFI_StartDetectFace(1,1,0);
          var strRes = "";
          if(nRet == 1)
          {
            strRes = "视频1开启检测成功，";
          }else if(nRet == 0)
          {
            strRes = "视频1开启检测失败，";
          }

          if(bIsGrayVideoInit)
          {
            nRet = FLFICtrl.FLFI_StartDetectFace(2,1,1);
            if(nRet == 1)
            {
              strRes += "视频2开启检测成功";
              document.getElementById("idStartDetectStatus").value = strRes;
            }else if(nRet == 0)
            {
              strRes += "视频2开启检测失败";
              document.getElementById("idStartDetectStatus").value = strRes;
            }
          }
          //开启提示定时器跟读卡定时器
          if(bFIInit && bRCInit)
          {
            clearInterval(timerFlag1);
            clearInterval(timerFlag2);
            strTipsType = "StartReadCard";
            timerFlag1 = setInterval("OperationTips()",500);
            timerFlag2 = setInterval("AutoReadCard()",500);
          }*/
          fs1000a3td.cam_switch(v)
         },FIOpenVideoV(){

        },FIInitV(){

        },FIReadCard(){
          huiWenDriver.FIReadCard();
        },onLoding(){
          let obj=fs1000a3td;
          console.info(obj);
        },camSwitch(capID){
          fs1000a3td.camera.cam_switch(capID)
        },closeVideoHY(){
          fs1000a3td.camera.CloseVideo();
        },BB(){
          fs1000a3td.camera.bb();
        },BB64(){
          //base64截图
          fs1000a3td.camera.bbase64();
        }

       },mounted() {
        /*demo.onload();*/
        fs1000a3td.camera.onLoad();
        // console.info(obj);
          //初始化
       /* debugger
        //页面加载完成后，才能开始打开视频
        setTimeout(function(){
           this.FIOpenVideo();
        },100);
        //FIOpenVideo();
        setTimeout(function(){
          this.FIInit();
        },10);
        //需要等视频完全打开后才能检测人脸
        setTimeout("FIStartDetectFace()",2000);*/
      }
    }
</script>

<style scoped>

</style>
